// index.js
Page({
  data: {
    name: '张三',
    age: 18,
    address: {
      province: '广东省',
      city: '深圳市'
    },
    isShow: false,
    personInfo: [{
        id: 1001,
        name: '小🐥',
        age: 11,
        hobby: '唱',
        time: '两年半'
      },
      {
        id: 1002,
        name: '小🐥',
        age: 12,
        hobby: '跳',
        time: '两年半'
      },
      {
        id: 1003,
        name: '小🐥',
        age: 13,
        hobby: 'rap',
        time: '两年半'
      },
      {
        id: 1004,
        name: '小🐥',
        age: 14,
        hobby: '🏀',
        time: '两年半'
      }
    ]
  },
  change() {
    this.setData({
      name: '李四',
      age: 20,
      address: {
        province: '湖北省',
        city: '武汉市'
      },
      isShow: !this.data.isShow
    }, () => {
      console.log(this.data);
    })
  },
  goToSecond(e) {
    const {
      id,
      name
    } = e.target.dataset
    wx.navigateTo({
      url: `/pages/second/second?id=${id}&name=${name}`,
    })
  }
})